package com.qf.business.feign.fallback;

import com.qf.business.feign.classes.ClsFeign;
import com.qf.data.entity.Classes;
import com.qf.data.r.Codes;
import com.qf.data.r.R;
import com.qf.data.r.RUtils;
import org.springframework.stereotype.Component;

/**
 * description:
 * author: Ken
 * 公众号：Java架构栈
 */
@Component
public class ClsFeignFallback implements ClsFeign {

    /**
     * getClsByCid降级方法
     * @param cId
     * @return
     */
    @Override
    public R<Classes> getClsByCid(Long cId) {
        return RUtils.create(Codes.DEGRADE_ERROR);
    }

    @Override
    public R updateClsNums(Long cid, Integer nums, Integer type) {
        return RUtils.create(Codes.DEGRADE_ERROR);
    }
}
